package com.example.reservationbilliards.pojo;

import lombok.Data;

import java.util.List;

@Data
public class LoginResponse {
    private String sign;
    private int currentPage;
    private String rcode;
    private String rmsg;
    private long timestamp;
    private int total;
    private String key;
    private String code;
    private LoginResult result;
    private String rsys;
    private String msg;
    private int pageSize;

    @Data
    public static class LoginResult {
        private String guid;
        private long expire;
        private int reversalFlag;
        private User user;
        private String token;
        private List<EnterpriseInfo> enterpriseInfo;

        @Data
        public static class User {
            private String headImgUrl;
            private String realName;
            private String mobile;
            private String bindingApple;
            private String deviceNum;
            private String cardNumber;
            private int userId;
            private String userName;
            private String deviceNumFlag;
            private String nickname;
            private String email;
            private Gender gender;
            private String bindingWechat;

            @Data
            public static class Gender {
                private String name;
                private String value;
                private String code;
            }
        }

        @Data
        public static class EnterpriseInfo {
            private ParkAttribute parkAttribute;
            private int relProjectId;
            private String projectEnterpriseName;
            private OwnershipStatus ownershipStatus;
            private DefaultFlag defaultFlag;
            private EnterpriseType enterpriseType;
            private int projectEnterpriseId;
            private int relEnterpriseId;

            @Data
            public static class ParkAttribute {
                private String name;
                private String value;
                private String code;
            }

            @Data
            public static class OwnershipStatus {
                private String name;
                private String value;
                private String code;
            }

            @Data
            public static class DefaultFlag {
                private String name;
                private String value;
                private String code;
            }

            @Data
            public static class EnterpriseType {
                private String name;
                private String value;
                private String code;
            }
        }
    }
}